﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Banner.aspx.cs" Inherits="Web_Oto.Administer.Banner" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2010.3.1317.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="shell">
        <!-- Message box -->
        <div id="msgBox" runat="server">
        </div>
        <!-- End Message box -->
        <!-- Main -->
        <div id="main">
            <div class="cl">
                &nbsp;</div>
            <!-- Content -->
            <div id="fullContent">
                <!-- Box -->
                <div class="box">
                    <!-- Box Head -->
                    <div class="box-head">
                        <h2>
                            Quản lý banner</h2>
                    </div>
                    <!-- End Box Head -->
                    <telerik:RadGrid ID="grid" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        DataMember="Id" GridLines="None" OnDeleteCommand="grid_DeleteCommand" OnNeedDataSource="grid_NeedDataSource"
                        OnInsertCommand="grid_InsertCommand" OnUpdateCommand="grid_UpdateCommand">
                        <MasterTableView DataMember="Id" NoMasterRecordsText="Chưa có hình ảnh nào trong banner" CommandItemDisplay="Bottom"
                            DataKeyNames="Id" PageSize="15">
                            <CommandItemSettings AddNewRecordText="Thêm hình ảnh vào banner" RefreshText=""></CommandItemSettings>
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridTemplateColumn HeaderText="STT">
                                    <ItemTemplate>
                                        <asp:Label runat="server" ID="STT" Text='<%# Eval("STT") %>'></asp:Label>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>                                 
                                <telerik:GridTemplateColumn HeaderText="Giới thiệu">
                                    <ItemTemplate>
                                        <asp:Label ID="lblIntro" runat="server" Text='<%# Eval("Intro") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>                                       
                                        <telerik:RadTextBox ID="txtIntro" runat="server" Text='<%# Eval("Intro") %>' Width="800px"></telerik:RadTextBox>                                        
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>                               
                                <telerik:GridTemplateColumn HeaderText="Url">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUrl" runat="server" Text='<%# Eval("Url") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>                                       
                                        <telerik:RadTextBox ID="txtUrl" runat="server" Text='<%# Eval("Url") %>' Width="800px"></telerik:RadTextBox>                                        
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Hình đại diện" UniqueName="Upload" Display="False">
                                    <EditItemTemplate>
                                        <telerik:RadUpload ID="uploadAvatar" runat="server" Skin="Office2007" InitialFileInputsCount="1"
                                            MaxFileInputsCount="1" ControlObjectsVisibility="None" MaxFileSize="0" AllowedFileExtensions=".jpg,.png,.bmp,.gif">
                                        </telerik:RadUpload>
                                        <asp:HiddenField runat="server" ID="hdfImage" Value='<%# Eval("Image") %>' />
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridEditCommandColumn UpdateText="Cập nhật" EditText="Cập nhật" ButtonType="ImageButton" />
                                <telerik:GridButtonColumn CommandName="Delete" Text="Xóa" UniqueName="columnDelete"
                                    ButtonType="ImageButton" ConfirmText="Bạn muốn xóa hình ảnh banner ?">
                                </telerik:GridButtonColumn>
                            </Columns>
                            <EditFormSettings>
                                <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"
                                    ButtonType="ImageButton" CancelText="Hủy" EditText="Cập nhật" HeaderButtonType="None"
                                    InsertText="Thêm mới" UpdateText="Cập nhật">
                                </EditColumn>
                            </EditFormSettings>
                            <PagerStyle FirstPageToolTip="Trang đầu" LastPageToolTip="Trang cuối" NextPagesToolTip="Trang tiếp"
                                NextPageToolTip="Trang tiếp" PageSizeLabelText="Số dòng trên một trang:" PrevPagesToolTip="Trang trước"
                                PrevPageToolTip="Trang trước" 
                                PagerTextFormat="Change page: {4} &amp;nbsp;Trang {0} trong {1} trang, từ dòng {2} đến dòng {3} trong {5} dòng" />
                        </MasterTableView>
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                        </HeaderContextMenu>
                    </telerik:RadGrid>
                </div>
                <!-- End Box -->
            </div>
            <!-- End Content -->
            <div class="cl">
                &nbsp;</div>
        </div>
        <!-- Main -->
    </div>
</asp:Content>
